package com.sdp.irrigation.db.irrigation_eq_type.service.impl;

import com.sdp.irrigation.entity.IrrigationEqType;
import com.sdp.irrigation.db.irrigation_eq_type.mapper.IrrigationEqTypeMapper;
import com.sdp.irrigation.db.irrigation_eq_type.service.IIrrigationEqTypeService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 设备类型 服务实现类
 * </p>
 *
 * @author zsp
 * @since 2025-03-01
 */
@Service
public class IrrigationEqTypeServiceImpl extends ServiceImpl<IrrigationEqTypeMapper, IrrigationEqType> implements IIrrigationEqTypeService {

	@Override
	public IrrigationEqType queryEqTypeByTypeCode(String typeCode) {
		LambdaQueryWrapper<IrrigationEqType> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(IrrigationEqType::getTypeCode, typeCode);
		return getOne(queryWrapper,false);
	}

}
